<!DOCTYPE html>
<html lang="zh-cn">
<!--

ULink 柚链 1.0版本源代码
作者：Joseph Lee
QQ：202938099

ULink Ver1.0 Source Code
Author: Joseph Lee
QQ: 202938099

使用 MIT License 开源协议开源
Opensource under the MIT License

http://www.air-software.top
http://fwdl.ink

-->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta http-equiv="Page-Enter" content="revealTrans(Duration=3.0,Transition=12)">
  <meta name="author" content="Joseph Lee" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
  <!-- CSS  -->
  <link href="css/googleicon.css" rel="stylesheet">
  <link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection" />
  <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection" />
  <!-- <link href="css/animate.css" type="text/css" rel="stylesheet" /> -->
  <!--
  已被弃用的动画样式
  开启动画样式请浏览这个样式的官网：https://daneden.github.io/animate.css/
  -->
  <?php
	 @$target = $_POST['target'];
	 @$address = $_POST['ulink'];
	 require 'generate.php';
	 if($target !== '' and $target !== null and $address !== '' and $address !== null) {
	 $result = generate($address,$target); 
	 switch($result)
	 {
		case 0:
			echo '
			<script type="text/javascript">
			alert("生成成功。");
			</script>
			';
			break;
		case 1:
			echo '
			<script type="text/javascript">
			alert("链接已经存在！");
			</script>
			';
			break;
		case 2:
			echo '
			<script type="text/javascript">
			alert("这个链接是系统保留，目前暂不开放。");
			</script>
			';
			break;
		case 3:
			echo '
			<script type="text/javascript">
			alert("空的链接地址或跳转目的地址！");
			</script>
			';
			break;
		default:
			echo '
			<script type="text/javascript">
			alert("系统未知错误 (Unknown error [null])");
			</script>
			';
		}
	 }
  ?>
  <script type="text/javascript">
  // 本段代码选自网络
  var Terminal = {language : (navigator.browserLanguage || navigator.language).toLowerCase()}
  	var userlang;

    switch(Terminal.language){
	
    case 'zh-cn':
    userLang = 'SIMPLIFIED';
	console.log('你好，中国的朋友，欢迎使用 ULink！');
	document.write('<title>柚链：速度飞快的短链平台</title>');
    break;
	// 你好! 
	
    case 'zh-tw':
    userLang = 'TRADITIONAL';
	console.log('你好，中國的朋友，歡迎使用 ULink！');
	document.write('<title>ULink：高速短連結平臺</title>');
    break;
	// 你好! 
	
    case 'zh-hk':
    userLang = 'TRADITIONAL';
	console.log('你好，中國的朋友，歡迎使用 ULink！');
	document.write('<title>ULink：高速短連結平臺</title>');
    break;
	// 你好! 
	
	case 'ja-jp':
	userLang = 'JAPANESE';
	console.log('こんにちは、日本の友達を歓迎し、使用 ULink！');
	document.write('<title>ULink: 高速短リンクプラットフォーム</title>');
	window.location.href="global.html";
	// こんにちは! 
	
	case 'fr-fr':
	userLang = 'FRENCH';
	console.log('Bonjour, ami de la France, bienvenue ULink!');
	document.write('<title>ULink: Plate - forme de liaison courte à grande vitesse</title>');
	window.location.href="global.html";
	// Bonjour! 
	
    default:
    userLang = 'ENGLISH';
	console.log('Hello, friends from around the world, welcome to use ULink! ');
	document.write('<title>ULink: A High-Speed Short Link Platform</title>');
	window.location.href="global.html";
	// Hello! 
	
    }
	console.log('Copyright (C) 2017 Joseph Lee. All rights reserved. \nE-Mail: admin@air-software.top\nBlog: http://blog.air-software.top\nQQ: 202938099');
	console.log('Do not distributed! ');
  </script>
</head>
<body>
  <nav class="light-blue lighten-1 nav-extended" role="navigation">
    <div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo center">ULink 柚链</a></div>
	<div class="nav-content">
      <ul class="tabs tabs-transparent">
        <li class="tab"><a class="active" href="#">主页</a></li>
        <li class="tab"><a href="#generator">生成器</a></li>
        <!-- <li class="tab"><a href="#query">访问量查询</a></li> -->
      </ul>
    </div>
  </nav>
  <div class="section no-pad-bot" id="index-banner">
    <div class="container">
      <br><br>
      <h1 class="header center orange-text">柚链</h1>
      <div class="row center">
        <h5 class="header col s12 light">速度飞快的短链平台。</h5>
      </div>
      <div class="row center">
	  
	  <div id="generator">
	  <h5 class="header col s12 light">
	  这是生成器。
	  <form action="index.php" method="post"><br>
		目标地址（请带有前缀）：<input type="text" name="target" />
		柚链名：<input type="text" name="ulink" />
		<input type="submit" class="waves-effect" value="点此提交" />
	  </form>
	  </h5>
	  </div>
	  
	  <div id="query">
	  <!--
	  <h5 class="header col s12 light">
	  这是访问量查询。</h5>
	  </div>
	  -->
	  
      </div>
      <br><br>

    </div>
  </div>


  <div class="container">
    <div class="section">

      <!--   Icon Section   -->
      <div class="row">
	    <br>
        <div class="col s12 m4">
          <div class="icon-block">
            <h2 class="center light-blue-text"><i class="material-icons">&#xE905;</i></h2>
            <h5 class="center">起飞般的跳转速度。</h5>

            <p class="light">点击跳转链接，通常只需不足1秒，跳转即刻完成。</p>
          </div>
        </div>

        <div class="col s12 m4">
          <div class="icon-block">
            <h2 class="center light-blue-text"><i class="material-icons">&#xE2BD;</i></h2>
            <!--
			<h5 class="center">首个统计用户访问量的短链平台。</h5>

            <p class="light">选择顶部“访问量查询”即刻查询。<br>所有柚链都统计访问量，查询时只需输入您的柚链地址。</p>
			-->
			<h5 class="center">全球通用。</h5>

            <p class="light">Incapsula 和 知道创宇云安全，从美国到中国。</p>
          </div>
        </div>

        <div class="col s12 m4">
          <div class="icon-block">
            <h2 class="center light-blue-text"><i class="material-icons">&#xE643;</i></h2>
            <h5 class="center">没有广告！</h5>

            <p class="light">ULink 所有界面现在没有广告，以后也不会有！<br>体验很棒，不是吗？</p>
          </div>
        </div>
      </div>
	<br><br>
    </div>
    <br>
  </div>

  <footer class="page-footer orange">
    <div class="container">
      <div class="row">
        <div class="col l3 s12">
          <h5 class="white-text">Links</h5>
          <ul>
            <!-- <li><a class="white-text" href="reserved/ULProject/sourcedl.html">Download ULink Source Code</a></li> -->
            <!-- <li><a class="white-text" href="reserved/ULProject/gitee.html">ULink Project in Gitee</a></li> -->
            <li><a class="white-text" href="mailto:admin@air-software.top">Mail To Joseph Lee</a></li>
            <li><a class="white-text" href="mailto:webmaster@air-software.top">Mail To The Webmaster</a></li>
          </ul>
        </div>
        <div class="col l3 s12">
          <h5 class="white-text">Language / 語言</h5>
          <ul>
            <li><a class="white-text" href="index.php">简体中文 / Simplified Chinese</a></li>
            <!-- <li><a class="white-text" href="language.php?lang=zh-tw">繁體中文 / Traditional Chinese</a></li> -->
            <li><a class="white-text" href="global.php">English</a></li>
            <!-- <li><a class="white-text" href="#!">Link 4</a></li> -->
          </ul>
        </div>
      </div>
    </div>
    <div class="footer-copyright">
      <div class="container">
      Copyright &copy; <?php echo(date("Y")); ?> Joseph Lee. All rights reserved. <br>
	  Users on this platform are not allowed to issue laws and regulations against China and / or your country or area on this platform. <br>
	  The webmaster reserves the right to delete and change the links that are generated on the platform at any time. 
      </div>
    </div>
  </footer>


  <!--  Scripts-->
  <script src="js/jquery-2.1.1.min.js"></script>
  <script src="js/materialize.js"></script>
  <script src="js/init.js"></script>

  </body>
</html>